package com.example.houseitemmanagebackend.controller;

import com.example.houseitemmanagebackend.service.StatusService;
import com.example.houseitemmanagebackend.vo.Result;
import com.example.houseitemmanagebackend.vo.StatusVO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 状态管理控制器
 */
@Tag(name = "状态管理", description = "物品状态管理相关接口")
@RestController
@RequestMapping("/statuses")
public class StatusController {

    @Autowired
    private StatusService statusService;

    @Operation(summary = "获取状态列表", description = "获取状态列表接口")
    @GetMapping
    public Result<List<StatusVO>> getStatusList() {
        return Result.success(statusService.getStatusList());
    }
}